<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function User(name) {
        this.name = name;
        this.doit = function () {
          console.log(this.name);
        };
        return;
      }

      function user(name) {
        this.name = name;
        this.doit = () => {
          console.log(this.name);
        };
      }

      let u1 = new User("abc");
      console.log(u1);
      u1.doit();
      let u2 = new user("ccc");
      console.log(u2);
      u2.doit();
    </script>
  </body>
</html>
